#ifndef _CHECKER_H_
#define _CHECKER_H_

#include "Query.h"

class Checker
{
public:
	Checker();

	virtual bool check(OperatorNode *node1, OperatorNode *node2) = 0;
};

class PropertyChecker : public Checker
{
private:
	bool checkDependencies(Query *query, OperatorNode *node);
public:
	PropertyChecker();

	virtual bool check(OperatorNode *node1, OperatorNode *node2);
	bool checkCommutativity(OperatorNode *node1, OperatorNode *node2);
	bool checkDistributivity(OperatorNode *node1, OperatorNode *node2);
	bool checkDependencies(Query *query);
	bool checkMovable(OperatorNode *node1, OperatorNode *node2);
};

#endif